package com.wisdom.demo.controller;

import com.wisdom.demo.service.UserService;
import com.wisdom.demo.model.UserInfo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 11951
 * Date: 2025-03-21
 * Time: 11:11
 */
@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/login")
    public boolean login(String name,String password){
        UserInfo userInfo= userService.queryUserBYPassword(name, password);
        if(userInfo != null){
            return true;
        }
        return false;
    }
}
